[FIR-296] Extend ff-avatar with numeric size, name initials, shape and tones - #62
Merged
Merged
Conversation
…round/cornerRadius and tone Adds a literal pixel size, automatic initials from `name` (explicit `initials` still overrides it), an optional square shape via `round`/`cornerRadius`, and a decorative `tone` background palette mirroring ff-badge's color axis. Additive only: default rendering (size 'md', round circle, no tone) is unchanged.
Widens size to accept a literal pixel number and adds name, round, cornerRadius and tone, matching the ff-avatar implementation.
Covers numeric size, name-derived initials (with explicit override), round/cornerRadius and all FfAvatarTone values, following the existing DemoSection idiom.
Adds Unreleased entries to design-system and design-system-contract changelogs for the additive ff-avatar API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Additive extension of
ff-avatarcovering Flydocs' real usage (86hub-avataruses, mostly decorative icon-chips with tones — FIR-296, FF-CAT-07):sizewidened to'sm' | 'md' | 'lg' | number— literal px with proportional initials scalingname→ auto-derived initials (compound names, unicode, whitespace; explicitinitialsstill wins)round(default true) /cornerRadiusfor square shapestone— decorative background palette, same 7 semantic values asFfBadgeColor; component tokens consumed with fallback (FIR-316 pattern), zero hex literalsNo breaking changes: no default flipped, no export renamed; VR suite 15/15 with zero baseline diffs (default rendering untouched). Contract, catalog demos and both packages'
[Unreleased]changelogs updated.How to verify
pnpm nx test design-system— 627/627 (initials derivation edge cases + round-wins-over-cornerRadius contract covered)pnpm nx serve playground --port 4311→ /catalog/avatar: new sections for numeric size, name initials, shape and tonesTraceability
Board ticket without owning PASO: key in branch and commit subjects.